| Ordering an index refresh (e.g. with our bulk and refresh for each transaction) is considered prohibitive in production even though it makes things easier especially for unit tests. We have two approaches:
- offer a way to enable or disable bulk and refresh as a global option (systematic refresh being not recommended for production) and explaining that the data won't be available
- use the coalescing of operations across all transactions (in a given node) to limit the number of bulks and refresh going in from a given node
Note that approach 2 is sufficient only when the number of client nodes is small. It is better to still have the explicit option, as refreshing every 1s or so is how Elasticsearch works best. Approach 3 would be to select per transaction + per entity (or per index) whether a refresh is requested? |