@Override public void run(IndexingContext target) throws IOException { // TODO igorf guard against concurrent configuration changes // it is possible that Repository and/or target IndexingContext configuration have changed // and temporary context is populated based contains old/stale configuration // need to detect when this happens based on target timestamp for example and skip replace if (target != null) { target.replace(temporary.getIndexDirectory()); } else { log.warn("Could not perform index operation on repository {}", repository.getId(), new Exception()); } } });
protected void openAndWarmup() throws IOException { // IndexWriter (close) if ( indexWriter != null ) { indexWriter.close(); indexWriter = null; } if ( searcherManager != null ) { searcherManager.close(); searcherManager = null; } this.indexWriter = new NexusIndexWriter( getIndexDirectory(), getWriterConfig() ); this.indexWriter.commit(); // LUCENE-2386 this.searcherManager = new SearcherManager( indexWriter, false, new NexusIndexSearcherFactory( this ) ); }
protected void openAndWarmup() throws IOException { // IndexWriter (close) if ( indexWriter != null ) { indexWriter.close(); indexWriter = null; } if ( searcherManager != null ) { searcherManager.close(); searcherManager = null; } this.indexWriter = new NexusIndexWriter( getIndexDirectory(), getWriterConfig() ); this.indexWriter.commit(); // LUCENE-2386 this.searcherManager = new SearcherManager( indexWriter, false, new NexusIndexSearcherFactory( this ) ); }
protected void openAndWarmup() throws IOException { // IndexWriter (close) if ( indexWriter != null ) { indexWriter.close(); indexWriter = null; } if ( searcherManager != null ) { searcherManager.close(); searcherManager = null; } this.indexWriter = new NexusIndexWriter( getIndexDirectory(), getWriterConfig() ); this.indexWriter.commit(); // LUCENE-2386 this.searcherManager = new SearcherManager( indexWriter, false, new NexusIndexSearcherFactory( this ) ); }