protected void releaseWriterAndReaders()
   {
      if (indexWriter != null)
      {
         try
         {
            indexWriter.close();
         }
         catch (IOException e)
         {
            log.warn("Exception closing index writer: " + e.toString());
         }
         indexWriter = null;
      }
      if (indexReader != null)
      {
         try
         {
            indexReader.close();
         }
         catch (IOException e)
         {
            log.warn("Exception closing index reader: " + e.toString());
         }
         indexReader = null;
      }
      if (readOnlyReader != null)
      {
         try
         {
            readOnlyReader.release();
         }
         catch (IOException e)
         {
            log.warn("Exception closing index reader: " + e.toString());
         }
         readOnlyReader = null;
      }
      if (sharedReader != null)
      {
         try
         {
            sharedReader.release();
         }
         catch (IOException e)
         {
            log.warn("Exception closing index reader: " + e.toString());
         }
         sharedReader = null;
      }
   }
protected void releaseWriterAndReaders ( ) { if ( indexWriter != null ) { try { indexWriter . close ( ) ; } catch ( IOException e ) { log . warn ( "Exception closing index writer: " + e . toString ( ) ) ; } indexWriter = null ; } if ( indexReader != null ) { try { indexReader . close ( ) ; } catch ( IOException e ) { log . warn ( "Exception closing index reader: " + e . toString ( ) ) ; } indexReader = null ; } if ( readOnlyReader != null ) { try { readOnlyReader . release ( ) ; } catch ( IOException e ) { log . warn ( "Exception closing index reader: " + e . toString ( ) ) ; } readOnlyReader = null ; } if ( sharedReader != null ) { try { sharedReader . release ( ) ; } catch ( IOException e ) { log . warn ( "Exception closing index reader: " + e . toString ( ) ) ; } sharedReader = null ; } }
Releases all potentially held index writer and readers.