public void release() throws IOException { nexusIndexMultiReader.release(); }
public void release() throws IOException { nexusIndexMultiReader.release(); }
public void release() throws IOException { nexusIndexMultiReader.release(); }
public synchronized IndexReader acquire() throws IOException { if ( searchers != null ) { release(); throw new IllegalStateException( "acquire() called 2nd time without release() in between!" ); } this.searchers = new ArrayList<IndexSearcher>(); final ArrayList<IndexReader> contextReaders = new ArrayList<IndexReader>( contexts.size() ); for ( IndexingContext ctx : contexts ) { final IndexSearcher indexSearcher = ctx.acquireIndexSearcher(); searchers.add( indexSearcher ); contextReaders.add( indexSearcher.getIndexReader() ); } return new MultiReader( contextReaders.toArray( new IndexReader[contextReaders.size()] ) ); }
public synchronized IndexReader acquire() throws IOException { if ( searchers != null ) { release(); throw new IllegalStateException( "acquire() called 2nd time without release() in between!" ); } this.searchers = new ArrayList<IndexSearcher>(); final ArrayList<IndexReader> contextReaders = new ArrayList<IndexReader>( contexts.size() ); for ( IndexingContext ctx : contexts ) { final IndexSearcher indexSearcher = ctx.acquireIndexSearcher(); searchers.add( indexSearcher ); contextReaders.add( indexSearcher.getIndexReader() ); } return new MultiReader( contextReaders.toArray( new IndexReader[contextReaders.size()] ) ); }
public synchronized IndexReader acquire() throws IOException { if ( searchers != null ) { release(); throw new IllegalStateException( "acquire() called 2nd time without release() in between!" ); } this.searchers = new ArrayList<IndexSearcher>(); final ArrayList<IndexReader> contextReaders = new ArrayList<IndexReader>( contexts.size() ); for ( IndexingContext ctx : contexts ) { final IndexSearcher indexSearcher = ctx.acquireIndexSearcher(); searchers.add( indexSearcher ); contextReaders.add( indexSearcher.getIndexReader() ); } return new MultiReader( contextReaders.toArray( new IndexReader[contextReaders.size()] ) ); }