public IndexSearcher acquireIndexSearcher() throws IOException { final NexusIndexMultiReader mr = new NexusIndexMultiReader( getMembers() ); return new NexusIndexMultiSearcher( mr ); }
public int getSize() throws IOException { int size = 0; for ( IndexingContext ctx : getMembers() ) { size += ctx.getSize(); } return size; }
public void updateTimestamp( boolean save, Date timestamp ) throws IOException { this.timestamp = timestamp; if ( save ) { IndexUtils.updateTimestamp( indexDirectory, getTimestamp() ); } }
public synchronized void replace( Directory directory ) throws IOException { final Date ts = IndexUtils.getTimestamp( directory ); closeReaders(); deleteIndexFiles( false ); IndexUtils.copyDirectory( directory, indexDirectory ); openAndWarmup(); // reclaim the index as mine storeDescriptor(); rebuildGroups(); updateTimestamp( true, ts ); optimize(); }
public IndexingContext addMergedIndexingContext( String id, String repositoryId, File repository, Directory indexDirectory, boolean searchable, Collection<IndexingContext> contexts ) throws IOException { IndexingContext context = new MergedIndexingContext( id, repositoryId, repository, indexDirectory, searchable, new StaticContextMemberProvider( contexts ) ); indexingContexts.put( context.getId(), context ); return context; }
public void closeIndexingContext( IndexingContext context, boolean deleteFiles ) throws IOException { context.close( deleteFiles ); }
public void updateTimestamp() throws IOException { updateTimestamp( false ); }
public synchronized void merge( Directory directory ) throws IOException { merge( directory, null ); }
/** * Returns new IndexWriterConfig instance * * @since 5.1 */ protected IndexWriterConfig getWriterConfig() { return NexusIndexWriter.defaultConfig(); }
public IndexingContext createMergedIndexingContext( String id, String repositoryId, File repository, File indexDirectory, boolean searchable, ContextMemberProvider membersProvider ) throws IOException { IndexingContext context = new MergedIndexingContext( id, repositoryId, repository, indexDirectory, searchable, membersProvider ); return context; }
public IndexingContext addMergedIndexingContext( String id, String repositoryId, File repository, Directory indexDirectory, boolean searchable, Collection<IndexingContext> contexts ) throws IOException { IndexingContext context = new MergedIndexingContext( id, repositoryId, repository, indexDirectory, searchable, new StaticContextMemberProvider( contexts ) ); indexingContexts.put( context.getId(), context ); return context; }
public IndexSearcher acquireIndexSearcher() throws IOException { final NexusIndexMultiReader mr = new NexusIndexMultiReader( getMembers() ); return new NexusIndexMultiSearcher( mr ); }
public int getSize() throws IOException { int size = 0; for ( IndexingContext ctx : getMembers() ) { size += ctx.getSize(); } return size; }
public void updateTimestamp( boolean save, Date timestamp ) throws IOException { this.timestamp = timestamp; if ( save ) { IndexUtils.updateTimestamp( indexDirectory, getTimestamp() ); } }
public synchronized void merge( Directory directory ) throws IOException { merge( directory, null ); }
public IndexingContext addMergedIndexingContext( String id, String repositoryId, File repository, Directory indexDirectory, boolean searchable, Collection<IndexingContext> contexts ) throws IOException { IndexingContext context = new MergedIndexingContext( id, repositoryId, repository, indexDirectory, searchable, new StaticContextMemberProvider( contexts ) ); indexingContexts.put( context.getId(), context ); return context; }
public IndexSearcher acquireIndexSearcher() throws IOException { final NexusIndexMultiReader mr = new NexusIndexMultiReader( getMembers() ); return new NexusIndexMultiSearcher( mr ); }
public int getSize() throws IOException { int size = 0; for ( IndexingContext ctx : getMembers() ) { size += ctx.getSize(); } return size; }
public void updateTimestamp( boolean save, Date timestamp ) throws IOException { this.timestamp = timestamp; if ( save ) { IndexUtils.updateTimestamp( indexDirectory, getTimestamp() ); } }