public NexusIndexMultiSearcher( final NexusIndexMultiReader reader ) throws IOException { super( reader.acquire() ); this.nexusIndexMultiReader = reader; }
public void release() throws IOException { nexusIndexMultiReader.release(); }
/** * Locks down participating contexts, and returns a "merged" reader of them. In case of error, unlocks as part of * cleanup and re-throws exception. Without error, it is the duty of caller to unlock contexts! * * @param indexingContexts * @param ignoreContext * @return * @throws IOException */ protected NexusIndexMultiReader getMergedIndexReader( final Collection<IndexingContext> indexingContexts, final boolean ignoreContext ) throws IOException { final List<IndexingContext> contexts = getParticipatingContexts( indexingContexts, ignoreContext ); return new NexusIndexMultiReader( contexts ); }
indexSearcher.getNexusIndexMultiReader().getAcquiredSearchers(); for ( int i = 0; i < contexts.size(); i++ )
/** * Locks down participating contexts, and returns a "merged" reader of them. In case of error, unlocks as part of * cleanup and re-throws exception. Without error, it is the duty of caller to unlock contexts! * * @param indexingContexts * @param ignoreContext * @return * @throws IOException */ protected NexusIndexMultiReader getMergedIndexReader( final Collection<IndexingContext> indexingContexts, final boolean ignoreContext ) throws IOException { final List<IndexingContext> contexts = getParticipatingContexts( indexingContexts, ignoreContext ); return new NexusIndexMultiReader( contexts ); }
indexSearcher.getNexusIndexMultiReader().getAcquiredSearchers(); for ( int i = 0; i < contexts.size(); i++ )
/** * Locks down participating contexts, and returns a "merged" reader of them. In case of error, unlocks as part of * cleanup and re-throws exception. Without error, it is the duty of caller to unlock contexts! * * @param indexingContexts * @param ignoreContext * @return * @throws IOException */ protected NexusIndexMultiReader getMergedIndexReader( final Collection<IndexingContext> indexingContexts, final boolean ignoreContext ) throws IOException { final List<IndexingContext> contexts = getParticipatingContexts( indexingContexts, ignoreContext ); return new NexusIndexMultiReader( contexts ); }
public void release() throws IOException { nexusIndexMultiReader.release(); }
public NexusIndexMultiSearcher( final NexusIndexMultiReader reader ) throws IOException { super( reader.acquire() ); this.nexusIndexMultiReader = reader; }
final List<IndexSearcher> acquiredSearchers = indexSearcher.getNexusIndexMultiReader().getAcquiredSearchers(); for ( int i = 0; i < contexts.size(); i++ )
public IndexSearcher acquireIndexSearcher() throws IOException { final NexusIndexMultiReader mr = new NexusIndexMultiReader( getMembers() ); return new NexusIndexMultiSearcher( mr ); }
public void release() throws IOException { nexusIndexMultiReader.release(); }
public NexusIndexMultiSearcher( final NexusIndexMultiReader reader ) throws IOException { super( reader.acquire() ); this.nexusIndexMultiReader = reader; }
public IndexSearcher acquireIndexSearcher() throws IOException { final NexusIndexMultiReader mr = new NexusIndexMultiReader( getMembers() ); return new NexusIndexMultiSearcher( mr ); }
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 IndexSearcher acquireIndexSearcher() throws IOException { final NexusIndexMultiReader mr = new NexusIndexMultiReader( getMembers() ); return new NexusIndexMultiSearcher( mr ); }
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()] ) ); }