code: public void close() throws IOException
     {
        if (scorer != null)
        {
           // make sure scorer frees resources
           scorer.advance(Integer.MAX_VALUE);
        }
  
        if (releaseReaderOnClose && reader != null && reader instanceof ReleaseableIndexReader)
        {
           ((ReleaseableIndexReader)reader).release();
        }
     }
docs: {@inheritDoc}