The current elastic search queries could be optimized. There are currently two groups
Search queries - based on the parameters provided by the users the search queries (multi match) could be constructed in a way to use the most restrictive search parameter first.
update/create/delete queries - these use quite a few scripts to perform appropriate operations and keep the data consistent...some of these scripts require loops. While the primary objective is to speed up the search these operations could be updated with simpler scripts.
the use of setSize should be replaced with the use of streaming
The current elastic search queries could be optimized. There are currently two groups