private void storeDescriptor() throws IOException { Document hdr = new Document(); hdr.add( new Field( FLD_DESCRIPTOR, FLD_DESCRIPTOR_CONTENTS, Field.Store.YES, Field.Index.NOT_ANALYZED ) ); hdr.add( new Field( FLD_IDXINFO, VERSION + ArtifactInfo.FS + getRepositoryId(), Field.Store.YES, Field.Index.NO ) ); IndexWriter w = getIndexWriter(); w.updateDocument( DESCRIPTOR_TERM, hdr ); w.commit(); }
private void storeDescriptor() throws IOException { Document hdr = new Document(); hdr.add( new Field( FLD_DESCRIPTOR, FLD_DESCRIPTOR_CONTENTS, Field.Store.YES, Field.Index.NOT_ANALYZED ) ); hdr.add( new Field( FLD_IDXINFO, VERSION + ArtifactInfo.FS + getRepositoryId(), Field.Store.YES, Field.Index.NO ) ); IndexWriter w = getIndexWriter(); w.updateDocument( DESCRIPTOR_TERM, hdr ); w.commit(); }
private void storeDescriptor() throws IOException { Document hdr = new Document(); hdr.add( new Field( FLD_DESCRIPTOR, FLD_DESCRIPTOR_CONTENTS, Field.Store.YES, Field.Index.NOT_ANALYZED ) ); hdr.add( new Field( FLD_IDXINFO, VERSION + ArtifactInfo.FS + getRepositoryId(), Field.Store.YES, Field.Index.NO ) ); IndexWriter w = getIndexWriter(); w.updateDocument( DESCRIPTOR_TERM, hdr ); w.commit(); }
private void prepareCleanIndex( boolean deleteExisting ) throws IOException { if ( deleteExisting ) { closeReaders(); // unlock the dir forcibly if ( IndexWriter.isLocked( indexDirectory ) ) { unlockForcibly( lockFactory, indexDirectory ); } deleteIndexFiles( true ); } openAndWarmup(); if ( StringUtils.isEmpty( getRepositoryId() ) ) { throw new IllegalArgumentException( "The repositoryId cannot be null when creating new repository!" ); } storeDescriptor(); }
private void prepareCleanIndex( boolean deleteExisting ) throws IOException { if ( deleteExisting ) { closeReaders(); // unlock the dir forcibly if ( IndexWriter.isLocked( indexDirectory ) ) { IndexWriter.unlock( indexDirectory ); } deleteIndexFiles( true ); } openAndWarmup(); if ( StringUtils.isEmpty( getRepositoryId() ) ) { throw new IllegalArgumentException( "The repositoryId cannot be null when creating new repository!" ); } storeDescriptor(); }
private void prepareCleanIndex( boolean deleteExisting ) throws IOException { if ( deleteExisting ) { closeReaders(); // unlock the dir forcibly if ( IndexWriter.isLocked( indexDirectory ) ) { unlockForcibly( lockFactory, indexDirectory ); } deleteIndexFiles( true ); } openAndWarmup(); if ( StringUtils.isEmpty( getRepositoryId() ) ) { throw new IllegalArgumentException( "The repositoryId cannot be null when creating new repository!" ); } storeDescriptor(); }
if ( getRepositoryId() == null ) else if ( !getRepositoryId().equals( repoId ) ) + "[" + repoId + "] and not for repository [" + getRepositoryId() + "]" );
if ( getRepositoryId() == null ) else if ( !getRepositoryId().equals( repoId ) ) + "[" + repoId + "] and not for repository [" + getRepositoryId() + "]" );
if ( getRepositoryId() == null ) else if ( !getRepositoryId().equals( repoId ) ) + "[" + repoId + "] and not for repository [" + getRepositoryId() + "]" );