public synchronized void purge() throws IOException { closeReaders(); deleteIndexFiles( true ); openAndWarmup(); try { prepareIndex( true ); } catch ( ExistingLuceneIndexMismatchException e ) { // just deleted it } rebuildGroups(); updateTimestamp( true, null ); }
public synchronized void purge() throws IOException { closeReaders(); deleteIndexFiles( true ); openAndWarmup(); try { prepareIndex( true ); } catch ( ExistingLuceneIndexMismatchException e ) { // just deleted it } rebuildGroups(); updateTimestamp( true, null ); }
public synchronized void purge() throws IOException { closeReaders(); deleteIndexFiles( true ); openAndWarmup(); try { prepareIndex( true ); } catch ( ExistingLuceneIndexMismatchException e ) { // just deleted it } rebuildGroups(); updateTimestamp( true, null ); }
rebuildGroups(); Date mergedTimestamp = IndexUtils.getTimestamp( directory );
rebuildGroups(); Date mergedTimestamp = IndexUtils.getTimestamp( directory );
rebuildGroups(); Date mergedTimestamp = IndexUtils.getTimestamp( directory );
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(); }