Hi there! I'm looking for some guidance around what's the most fit way to retrieve a large amount of documents (>=1000) when you know their ID. I'd like it to be fast, yet efficient and not put unnecessary strain on ES since this lookup routine will run very often.
The mget documentation doesn't give any pointers as to how it's implemented or how how it's different than using a _search with a terms query. Are there usecases fit to tackle one thing over the other? It's not clear.
Purely on speed - both approaches seem to be fast and working fine with a large amount of documents, but reading through this thread made me think that mget does N parallel individual "get" operations which seems unnecessary and inefficient.
For retrieving N (large amount of) documents I'd imagine a batched approach would be much more fit (instead of running N parallel gets, you run J batches of retrieval, J being a much smaller number than N.) With that in mind, I'm guessing a _search terms query does this "batched" approach and is more lean but what do I know! This is pure speculation so I'd like to ask for some guidance around what each thing does.