code: protected synchronized CommittableIndexReader getIndexReader() throws IOException
     {
        if (indexWriter != null)
        {
           indexWriter.close();
           log.debug("closing IndexWriter.");
           indexWriter = null;
        }
  
        if (indexReader == null || !indexReader.isCurrent())
        {
           IndexReader reader = IndexReader.open(getDirectory(), null, false, termInfosIndexDivisor);
           // if modeHandler != null and mode==READ_ONLY, then reader should be with transient deletions.
           // This is used to transiently update reader in clustered environment when some documents have 
           // been deleted. If index reader not null and already contains some transient deletions, but it
           // is no more current, it will be re-created loosing deletions. They will already be applied by
           // coordinator node in the cluster. And there is no need to inject them into the new reader  
  
           indexReader =
              new CommittableIndexReader(reader, modeHandler != null && modeHandler.getMode() == IndexerIoMode.READ_ONLY);
        }
        return indexReader;
     }
docs: Returns an <code>IndexReader</code> on this index. This index reader
  may be used to delete documents.
  
  @return an <code>IndexReader</code> on this index.
  @throws IOException if the reader cannot be obtained.