@Override public void optimize() throws IOException { super.optimize(); // NEXUS-6156: Make SearcherManager be notified about this // This will release the deleted files removed after. SearcherManager is not reachable (private, no getter) // so this is the only way to make superclass invoke SearcherManager#maybeRefresh() releaseIndexSearcher(acquireIndexSearcher()); }
setAllGroups( allGroups ); optimize();
setAllGroups( allGroups ); optimize();
setAllGroups( allGroups ); optimize();
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 synchronized void replace( Directory directory, Set<String> allGroups, Set<String> rootGroups ) throws IOException { final Date ts = IndexUtils.getTimestamp( directory ); closeReaders(); deleteIndexFiles( false ); IndexUtils.copyDirectory( directory, indexDirectory ); openAndWarmup(); // reclaim the index as mine storeDescriptor(); if ( allGroups == null && rootGroups == null ) { rebuildGroups(); } else { if ( allGroups != null ) { setAllGroups( allGroups ); } if ( rootGroups != null ) { setRootGroups( rootGroups ); } } updateTimestamp( true, ts ); optimize(); }
public synchronized void replace( Directory directory, Set<String> allGroups, Set<String> rootGroups ) throws IOException { final Date ts = IndexUtils.getTimestamp( directory ); closeReaders(); deleteIndexFiles( false ); IndexUtils.copyDirectory( directory, indexDirectory ); openAndWarmup(); // reclaim the index as mine storeDescriptor(); if ( allGroups == null && rootGroups == null ) { rebuildGroups(); } else { if ( allGroups != null ) { setAllGroups( allGroups ); } if ( rootGroups != null ) { setRootGroups( rootGroups ); } } updateTimestamp( true, ts ); optimize(); }