elasticsearch/elasticsearch — pull request #6379 by mikemccand (2014-06-02 15:48:09+00:00)
Title: Core: clear versionMap on refresh not flush

Initial pull request; tests pass, but I have some nocommits.

I use 3 separate maps. 2 are for adds (current + old), and current becomes old when refresh begins, and old is cleared once refresh finishes (like Lucene's LiveFieldValues). The other map separately tracks / expires deletes.