@ Override public synchronized void close ( ) { final int count = INSTANCE . usageCount . get ( ) - 1 ; if ( count <= 0 ) { INSTANCE . usageCount . set ( 0 ) ; if ( searchingAnalyzer != null ) { searchingAnalyzer . close ( ) ; searchingAnalyzer = null ; } if ( indexReader != null ) { try { indexReader . close ( ) ; } catch ( IOException ex ) { LOGGER . trace ( "" , ex ) ; } indexReader = null ; } queryParser = null ; indexSearcher = null ; if ( index != null ) { try { index . close ( ) ; } catch ( IOException ex ) { LOGGER . trace ( "" , ex ) ; } index = null ; } } }
Closes the CPE Index .