How does es fetch the right source with stale docIDs, after lucene merged queried segments

It works because org.apache.lucene.index.IndexReader is ref-counted, and we use the same IndexReader for all phases of a search.

1 Like