I have a list of element ids (for example: [1, 23, 42, 45]) and I'm looking for the fastest way to check if in ES database elements with those ids already exist or not. In result I want to recieve response containing only ids which are present in Elasticsearch: for example [1, 42] - what means that elements with ids 1 and 42 are yet in DB.
Now I send a query for all element ids in the DB and then check if on those list are my [1, 23, 42, 45] or not. Is there any faster way ?