Percolate returns empty matches under heavy load during elasticsearch cluster re-sizing

hi,

we have a percolation miss problem described in this post http://stackoverflow.com/questions/30194246/percolate-returns-empty-matches-under-heavy-load-during-elasticsearch-cluster-re and probably related with this issue https://github.com/elastic/elasticsearch/issues/10722.

you can reproduce problem using this script https://gist.github.com/ekesken/de41598a1e7e54c6f33c

at least we need a workaround for now, because missing content is not acceptable for us. is there a way to check if every shard is really OK from code before sending percolation requests? obviously checking green status does not work.

/ekesken